<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="application/xhtml+xml; charset=UTF-8" />
		<script type="text/javascript" src="js/jquery-1.2.6.js"></script>
		<link type="text/css" rel="stylesheet" href="style/style.css" />
        <script type="text/javascript" src="plugin/artDialog.js?skin=green"></script>
        <script type="text/javascript">
            document.write('<script type="text/javascript" src="js/'+getQueryStr("language")+'.js"><\/script>');
        </script>
		<title>无线IPPBX</title>
</head>
<body class="gui">

<div id="wrapper">
<div id="content">
	<div id="header">
<div id="logo">
<h1>Control Panel</h1>
</div>

</div>
<div id="main">
<div id="contents_stat">
<form name="filters"  method="post" >
<fieldset>
<legend>
    <label sid="guide.title2"></label>
</legend>
<div class="frame_tab_layer">
<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle">
<tr>
<td colspan="2"  class="frame_tab_right" style="padding-right:50px;">
</td>
</tr>
 <tr>
<td  align="center" colspan="2" width="100%">
            <!--static-->
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle" id="staticid">
            <tr>
              <td  align="left" width="33%" style="padding-left:50px;" ><span class="errormsg" id="img2025">&#160;</span>&#160;<label for="id2025">
                  <label sid="inet.ip"></label>
                  </label>
              </td>
              <td class="frame_tab_right"><input name="id2025" id="id2025" type="text" size="17" maxlength="30"/></td>
            </tr>
            <tr>
              <td  align="left" width="33%" style="padding-left:50px;" ><span class="errormsg" id="img2026">&#160;</span>&#160;<label for="id2026">
                  <label sid="inet.netmask"></label>
                 </label>
              </td>
              <td class="frame_tab_right"><input name="id2026" id="id2026" type="text" size="17" maxlength="30"/></td>
            </tr>
            <tr>
              <td  align="left" width="33%" style="padding-left:50px;" ><span class="errormsg" id="img2027">&#160;</span>&#160;<label for="id2027">
                  <label sid="inet.gateway"></label>
                  </label>
              </td>
              <td class="frame_tab_right"><input name="id2027" id="id2027" type="text" size="17" maxlength="30"/></td>
            </tr>
            <tr>
              <td  align="left" width="33%" style="padding-left:50px;" ><span class="errormsg" id="img2028">&#160;</span>&#160;<label for="id2028">
                  <label sid="inet.pri_dns"></label>
            </label>
              </td>
              <td class="frame_tab_right"><input name="id2028" id="id2028" type="text" size="17" maxlength="30"/></td>
            </tr>
            <tr>
              <td  align="left" width="33%" style="padding-left:50px;" ><span class="errormsg" id="img2029">&#160;</span>&#160;<label for="id2029">
                  <label sid="inet.sec_dns"></label>
                 </label>
              </td>
              <td class="frame_tab_right"><input name="id2029" id="id2029" type="text" size="17" maxlength="30"/></td>
            </tr>
          </table>
          
            <!--pppoe-->
            <table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle" id="pppoeid">
            <tr>
              <td  align="left" width="33%" style="padding-left:50px;" ><span class="errormsg" id="img2030">&#160;</span>&#160;<label for="id2030">
                  <label sid="wan.pppoe_user"></label>
                </label>
              </td>
              <td class="frame_tab_right"><input name="id2030" id="id2030" type="text" size="17" maxlength="30"/>&nbsp;<font class="note">
                  <label sid="msg.pppoecue"></label>
                 </font><span style="padding-left:80px;"></span></td>
            </tr>
            <tr>
              <td  align="left" width="33%" style="padding-left:50px;" ><span class="errormsg" id="img2031">&#160;</span>&#160;<label for="id2031">
                  <label sid="wan.pppoe_pass"></label>
                 </label>
              </td>
              <td class="frame_tab_right"><input name="id2031" id="id2031" type="text" size="17" maxlength="30"/>&nbsp;<font class="note">
                  <label sid="msg.pppoecue"></label>
                </font><span style="padding-left:80px;"></span>
              	<!--<span style="padding-left:10px;"></span>
              	<script type="text/javascript">document.write("<input class=\"button\" type=\"button\" name=\"confirm\" value=\" "+wan.pppoe_confirm +"\" />");</script>--></td>
            </tr>
            <tr>
            	<td colspan="2" class="frame_tab_right">
            		<table width="100%" border="0" cellpadding="0" cellspacing="0" class="cmenutitle">
            <tr>
  				<td align="left">
  					<span style="padding-left:20px;"></span>
  					<input type="radio" name="id2052" id="id2052_radio1" value="KeepAlive"  checked />
                      <label sid="wan.pppoe_keepalive"></label>

  					</td>
			</tr>
			<tr>
  				<td align="left">
    					<span style="padding-left:40px;"></span>
                      <label sid="wan.pppoe_keepalive_select"></label>
    				    <input type="text" name="id2053_1" id="id2053_1" maxlength="6" size="6" value="60"/>
                      <label sid="wan.pppoe_secondes"></label>

  				</td>
			</tr>
			<tr>
  				<td align="left">
  					<span style="padding-left:20px;"></span>
  					<input type="radio" name="id2052" id="id2052_radio2" value="OnDemand"/>
                      <label sid="wan.pppoe_demand"></label>

  				</td>
			</tr>
			<tr>
				<td align="left">
					<span style="padding-left:40px;"></span>
                    <label sid="wan.pppoe_demand_select1"></label>

    				<input type="text" name="id2053_2" id="id2053_2" maxlength="6" size="6" value="5"/>
                    <label sid="wan.pppoe_demand_select2"></label>

  				</td>
			</tr>
			<tr>
  				<td align="left">
  					<span style="padding-left:20px;"></span>
  					<input type="radio" name="id2052" id="id2052_radio3" value="Manual"/>
                      <label sid="wan.pppoe_manual"></label>

  				</td>
			</tr>
			<tr>
				<td align="left">
					<span style="padding-left:40px;"></span>
                    <label sid="wan.pppoe_manual_select"></label>

  				</td>
			</tr>
		</table>
	</td>
</tr>
          </table>
</td>
</tr>
<tr>
<td  colspan="2"  class="frame_tab_right" style="padding-right:50px;">
</td>
</tr>
<tr>
<td  colspan="2" align="center">
    <input class="button" type="button"  sid="guide.previous" name="previous" value="" />
    <input class="button" type="button"  sid="guide.next" name="submit" value="" />
    <input class="button" type="button"  sid="main.cancel" name="cancel" value="" />
</td>
</tr>
</table>
</div>
</fieldset>
</form>
</div>
</div>

<div id="floatKiller"></div>
<div id="statusInfo">

<div class="info"><span id="loginuser"></span></div>
<!--<div class="info"><script type="text/javascript">Capture(share.logintime)</script><span id="uptime"></span></div>-->
    <div class="info">
        <button class="logout" onclick="reboot();">
            <img src="images/reboot.gif" border="0">&#160;
            <label sid="tools.td10"></label>
        </button>
        <button class="logout" onclick="logout();">
            <img src="images/logout.gif" border="0">&#160;
            <label sid="share.logout"></label>
        </button></div>
</div>

</div>
</div>
<div id="lock_div">&nbsp; </div>
<div id="lock_div2">&nbsp;</div>
<div id="message_panel"><span id="mess">&nbsp;</span><br/>
  <br/>
  <img src="images/jd.gif"/>
</div>
<div id="rightMenu" style="display: none">
    <ul>
        <li id="editWords">Edit</li>
        <li id="defaultValue">Default</li>
    </ul>
</div>
<script type="text/javascript">
	setTimeout("height_div()",500);
</script>
<script type="text/javascript" src="lib.js"></script>
<script type="text/javascript" src="js/message_panel.js"></script>
<script type="text/javascript">

    $("label").each(function () {
        var currentVal =$(this);
        var values =eval($(this).attr("sid"));
        if(typeof(values)!=="undefined"){

            $(this).html(decodeURIComponent(values));

        $(this).rightClick(function(){
            if(currentVal.attr("sid")) {
                showEditDialog(currentVal);
                currentVal.addClass("EditPosition");
            }
        });
        }
        if($(this).html()=="" && $(this).parent().hasClass("definition")){
            $(this).parent().hide();
            $(this).parent().prev().hide();
        }
    });

    $("input[type='button']").each(function () {
        $(this).val(decodeURIComponent(eval($(this).attr("sid"))));
        var currentButton =$(this);
        $(this).rightClick(function(){
            showEditDialog(currentButton,'val');
            currentButton.addClass("EditPosition");
        })


    });

    $("button").each(function(){
        var currentButton =$(this);
        var ButtonVal = currentButton.find("label");
        $(this).rightClick(function(){
            if(ButtonVal.attr("sid")) {
                showEditDialog(ButtonVal);
                ButtonVal.addClass("EditPosition");
            }
        })
    });

	$("#pppoeid").hide();
	$("#mode").hide();
    var thisurl = document.URL;
    var oldsettext = thisurl.split("?")[1];
    oldsettext = oldsettext.substr(8, oldsettext.length);
    var setarray = oldsettext.split("&");
	var value2024 = setarray[setarray.length-1].split("=")[1];
	var types = getQueryStr("types");

    changeConnectionType(value2024);
	var nonames = new Array("submit","previous","cancel","id2053_1","id2053_2","getmac","id2030","id2031","confirm");
	var sendtext = getSendText(nonames);
	sendtext += "&id=2030&id=2031&id=2053&id=2024";
	DataRequest("get_json",sendtext,function(data){
  	getResult(nonames,data);
	var values2053 = data["id2053"];
	var values2030 = data["id2030"];
	var values2031 = data["id2031"];
	if(values2030=="pppoe_user"){
			values2030="";
		}
		
	if(values2031=="pppoe_passwd"){
			values2031="";
		}
	updatecfgvalue("id2030",values2030);
	updatecfgvalue("id2031",values2031);
	if($("#id2052_radio1").attr("checked")&&values2053!=""){
		updatecfgvalue("id2053_1",values2053);
	}else if(parseInt(values2053) >= 60&&values2053!=""){
		var value2053 = parseInt(values2053)/60;
		updatecfgvalue("id2053_2",value2053);
	}
  });

    function submitvalue(value2024,types){
 	$(".errormsg").html('');
 	var nonames = new Array("submit","previous","cancel","id2053_1","id2053_2","getmac","id2031_1","confirm");
 	var settext = "&id2024="+value2024+"&types="+types;
		if(value2024=="PPPOE"){
			var value2052 = "";var value2053 = "";
			if($("#id2052_radio1").attr("checked")){
				value2053 = $("#id2053_1").val();
				settext += "&id2052="+$("#id2052_radio1").val();
			}else if($("#id2052_radio2").attr("checked")){
				value2053 = parseInt($("#id2053_2").val())*60;
				settext += "&id2052="+$("#id2052_radio2").val();
			}else if($("#id2052_radio3").attr("checked")){
				value2053="";
				settext += "&id2052="+$("#id2052_radio3").val();
			}
			settext += "&id2053="+value2053;
			settext += "&id2030="+$("#id2030").val();
			settext += "&id2031="+$("#id2031").val();
		}else if(value2024=="STATIC"){
			settext += "&id2025="+$("#id2025").val();
			settext += "&id2026="+$("#id2026").val();
			settext += "&id2027="+$("#id2027").val();
			settext += "&id2028="+$("#id2028").val();
			settext += "&id2029="+$("#id2029").val();
		}
		settext=settext.replace(/\#/g,"%23");
		window.location.href="guidewireless.htm?settext="+settext+"&language="+getQueryStr("language");
 	}
 	
 	$("[name=confirm]").click(function () {
 		alert($("#id2031").val());
	});
	
	$("[name=submit]").click(function () {
			submitvalue(value2024,types);
	});
    
     $("[name=previous]").click(function () {
        history.back();
    });
    
    $("[name=cancel]").click(function () {
        window.location.href="menuGuide.htm?language="+getQueryStr("language");
    });
    
    	function changeConnectionType(connmode){
		if(connmode=="STATIC"){
			$("#staticid").show();
			$("#pppoeid").hide();
			$("#l2tpid").hide();
			$("#pptpid").hide();
			$("#3gid").hide();
			$("#mode").hide();
		}else if(connmode=="PPPOE"){
			$("#staticid").hide();
			$("#pppoeid").show();
			$("#l2tpid").hide();
			$("#pptpid").hide();
			$("#3gid").hide();
			$("#mode").hide();
		}else if(connmode=="DHCP"){
			$("#staticid").hide();
			$("#pppoeid").hide();
			$("#l2tpid").hide();
			$("#pptpid").hide();
			$("#3gid").hide();
			$("#mode").hide();
		}
	}
</script>
</body>
</html>
